package com.zhangjianbing.hystrix.custom02.controller;

import com.zhangjianbing.hystrix.custom02.service.IUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author zhangjianbing
 * time 2021/2/20
 */
@RestController
@RequestMapping(value = "/test/controller")
public class TestController {

    @Resource
    private IUserService userService;

    @GetMapping(value = "/test/hystrix")
    public String m1() {
        return userService.getUserInfo("https://www.baidu.com");
    }

}
